package com.czr.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 问题表
 * </p>
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("czr_questions")
@ApiModel(value="czr_questions对象", description="问题表")
public class CzrQuestions extends Model<CzrQuestions> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "问题")
    @TableField("text")
    private String text;


    @ApiModelProperty(value = "问卷类型 1单选 2多选3文本")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "问卷id")
    @TableField("survey_id")
    private Long surveyId;

    @ApiModelProperty(value = "选项")
    private List<CzrOptions> czrOptionsList;

  


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
